﻿//change this to point to the webservice counterpart. most browsers won't allow localhost due to cross domain origin policy
var nsServiceURI = 'http://mobileservice.netstepsdev.com/MobileService.svc';
var plServiceURI = 'https://portaldev.partylite.com/mobile/svc';
var imageURI = 'https://scentsy.com/CMSImages/';
var baseListHeight = '315px'; //mobile safari
var isDesktop = false;
var ajaxTimeout = 120 * 1000; // ajax load timeout in milliseconds
var pageSize = 50;
var pageBackAnimation = { type: 'slide', direction: 'right' };
var syncClass = /Android/i.test(navigator.userAgent) ? 'sync-android' : 'sync';

document.addEventListener('deviceready', function () { baseListHeight = '360px' }); //native

var locales = {
    'at': { name: 'Austria', languages: ['de'] },
    'au': { name: 'Australia', languages: ['en'] },
    'ca': { name: 'Canada', languages: ['en', 'fr'] },
    'cz': { name: 'Czech Republic', languages: ['cs'] },
    'dk': { name: 'Denmark', languages: ['da'] },
    'fi': { name: 'Finland', languages: ['fi', 'sv'] },
    'fr': { name: 'France', languages: ['fr'] },
    'de': { name: 'Germany', languages: ['de'] },
    'ie': { name: 'Ireland', languages: ['en'] },
    'it': { name: 'Italy', languages: ['it'] },
    'mx': { name: 'Mexico', languages: ['es'] },
    'no': { name: 'Norway', languages: ['no'] },
    'pl': { name: 'Poland', languages: ['pl'] },
    'sk': { name: 'Slovakia', languages: ['sk'] },
    'se': { name: 'Sweden', languages: ['sv'] },
    'ch': { name: 'Switzerland', languages: ['de', 'fr', 'it'] },
    'gb': { name: 'United Kingdom', languages: ['en'] },
    'us': { name: 'United States', languages: ['en', 'es'] }
};

var languages = {
    'de': 'German',
    'en': 'English',
    'fr': 'French',
    'cs': 'Czech',
    'da': 'Danish',
    'fi': 'Finnish',
    'sv': 'Swedish',
    'it': 'Italian',
    'es': 'Spanish',
    'no': 'Norwegian',
    'pl': 'Polish',
    'sk': 'Slovak'
};